#ifndef QTCPDRIVE_H
#define QTCPDRIVE_H

#include "../../lib/shared/qabstractdrive.h"

#include <QTcpSocket>

class QTcpDrive : public QAbstractDrive
{
    Q_OBJECT
public:
    QTcpDrive(QObject *parent=0);
    virtual bool     addDriveMission(QDriveMission *mission);

    virtual QString name();
protected:
    void    initAttribute();
    void    initMission();
    void    initConnect();
    void    releaseConnect();
    void    analyseData(const QByteArray &data);

    QByteArray getSendData(QDriveMission *ms);
protected slots:
    void    state(QAbstractSocket::SocketState);
protected:
    QTcpSocket  *m_tcpSocket;
    QByteArray  m_data;
};

#endif // QTCPDRIVE_H
